-- GENERATED SPELL FOR [Don Carlos] --


function spell0_28132(pUnit, Event) --@Net,n/a--
pUnit:FullCastSpellOnTarget(12024,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28132', 5294, 1)
end

function spell1_28132(pUnit, Event) --@Net,n/a--
pUnit:FullCastSpellOnTarget(50762,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28132', 7326, 1)
end

function spell2_28132(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(16100,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28132', 570, 1)
end

function spell3_28132(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(16496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28132', 649, 1)
end

function spell4_28132(pUnit, Event) --@Summon Guerrero,Self--
pUnit:FullCastSpellOnTarget(50736,pUnit)
pUnit:RegisterEvent('Sorts_28132', 555, 1)
end

function Sorts_28132(pUnit, Event)
local choix_sorts_28132 = math.random(0, 4)
if choix_sorts_28132 == 0 then
pUnit:RegisterEvent('spell0_28132', 1, 1)
end
if choix_sorts_28132 == 1 then
pUnit:RegisterEvent('spell1_28132', 1, 1)
end
if choix_sorts_28132 == 2 then
pUnit:RegisterEvent('spell2_28132', 1, 1)
end
if choix_sorts_28132 == 3 then
pUnit:RegisterEvent('spell3_28132', 1, 1)
end
if choix_sorts_28132 == 4 then
pUnit:RegisterEvent('spell4_28132', 1, 1)
end
end

function mob28132_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28132', math.random(1500, 3000), 1)
end

function mob28132_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28132_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28132_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28132, 1, 'mob28132_Action')
RegisterUnitEvent(28132, 2, 'mob28132_Leave')
RegisterUnitEvent(28132, 3, 'mob28132_Kill')
RegisterUnitEvent(28132, 4, 'mob28132_Die')
